﻿using System;
using System.Collections.Generic;
using Autodesk.Revit.DB;

namespace ModelValidation.ClearHeightCheck
{
	public class ClearHeightArea
	{
		public ClearHeightArea(List<CurveLoop> curveLoop)
		{
			this.m_curveLoop = curveLoop;
		}

		public List<CurveLoop> GetCurveLoop()
		{
			return this.m_curveLoop;
		}

		public double GetMinClearHeight()
		{
			double num = double.MaxValue;
			if (this.m_ElementClearHeight.Count < 1)
			{
				return -1.0;
			}
			foreach (ElementAndClearHeight elementAndClearHeight in this.m_ElementClearHeight)
			{
				double clearHeight = elementAndClearHeight.getClearHeight();
				if (clearHeight < num)
				{
					num = clearHeight;
				}
			}
			return num;
		}

		public void AddElementItems(List<ElementAndClearHeight> elementHeightList)
		{
			this.m_ElementClearHeight.AddRange(elementHeightList);
		}

		public List<ElementAndClearHeight> getElementItems()
		{
			return this.m_ElementClearHeight;
		}

		private List<CurveLoop> m_curveLoop = new List<CurveLoop>();

		private List<ElementAndClearHeight> m_ElementClearHeight = new List<ElementAndClearHeight>();

		private double tol = 1E-05;
	}
}
